import { getResPath } from '@/utils/cimup';

export default (layer: any) => {
  const { positions, imageUrl } = layer;
  const points = positions?.map((x: any) => {
    return x?.map((c: any) => (c > 0 ? c : 0));
  });
  return {
    data: {
      imageUrl: getResPath(imageUrl),
      height: 20,
      color: '#63B8FF',
      speed: 0.3,
      vFlow: false,
      uvReversed: false,
      points,
    },
  };
};
